A particularly useful application of the invention relates to the display of images on LCD screens of cellular telephones or personal assistants (PDA) which are currently beginning to allow high quality images to be displayed, in other words screens that are capable of simultaneously displaying 262,144 colors.
As is well known, most of the colors to be displayed can be reproduced starting from three primary colors, namely red, green and blue (RGB). Likewise, the pixels, forming the images to be displayed on the screens or to be printed, are each associated with values of red, green and blue components. These component values are coded, for each pixel, in the form of a frame of bits whose width defines the maximum number of colors for the displayed image.
In this way, a 16-bit frame allows 65,536 colors to be displayed and an 18-bit frame allows 262,144 colors to be displayed, while a 24-bit frame allows 16 million colors to be simultaneously displayed.
Currently, liquid crystal LCD screens used in portable devices such as cellular telephones or PDAs only allow 262,144 colors to be displayed, which corresponds to an 18-bit frame. Such a frame comprises 6 bits for coding the red component, 6 bits for coding the green component and 6 bits for coding the blue component.
Thus, for optimal operation, the images delivered to a display with a capacity of 262,144 colors are coded by a frame with 18 bits per pixel. The problem is that the image processing algorithms and the hardware devices, in particular the frame memories, do not generally allow such a format to be supported.
In fact, frame memories that are used to store the images before they are displayed on a screen, are generally only designed for storing frames with 16 bits, 24 bits or 32 bits per pixel, i.e. a multiple of 8 bits (Byte).
In FIGS. 1 and 2, the layout of such a frame memory organized in 32-bit words for the storage of a frame with 16 bits per pixel and for the storage of a frame with 24 bits per pixel, respectively, is shown. As can be seen in FIG. 1, in a format with 16 bits per pixel, the blue and red components are coded by 5-bits, whereas 6 bits are used for the coding of the green component. Each memory address allows the values of red, green and blue components of 2 pixels (n, n+1) of an image to be stored.
As far as the storage of a frame with 24 bits per pixel is concerned, 8 bits are used for coding the red, green and blue components. Four pixels are stored in three memory words. Since the bits of four pixels can be stored in three 32-bit memory addresses (4×24=3×32), the result of this is that one pixel could end up spanning two memory words (pixels n+1 and n+2) such that, if it is desired to modify one pixel, two words need to be processed leading to a much longer processing time and a much higher bandwidth.
With reference to FIG. 3, when a frame memory with 24 bits per pixel is employed, an optimal quality for the displayed image is obtained. However, since a liquid crystal display of a portable device only generally supports a maximum of 18 bits per pixel, the two least significant bits of the coding words of the color components are not connected to the display (truncation of the exact value).
This approach allows 262,144 colors to be displayed, but at the cost of an increase in the size of the memory of 50% with respect to a frame memory with 16 bits per pixel. In addition, the required bandwidth is also increased by 50%. With regard to the quality of the images obtained, the PSNR (Peak Signal-to-Noise Ratio) ratio is 42.69 decibels for each 8-bit color component truncated to 6 bits. This ratio is conventionally calculated from a calculation of the mean square error MSE between reference pixel values and pixel values resulting from the truncation.
Referring now to FIG. 4, in which the use of a frame memory with 16 bits per pixel for displaying images on an LCD display with 18 bits per pixel is shown, it can be seen that, in this case, the red and blue 5-bit coding words and the coding word for the green component, with a 6-bit coding, are transmitted in their entirety into the corresponding inputs of the LCD display. However, in this case, the least significant bits (LSBs) of the red and blue components of the frame memory are not connected. In the exemplary embodiment shown, the LSB bits of the red and blue components are set at zero. The stored coding words for the red and blue components may however be respectively generated either by truncation, or by calculation of a rounded value starting from the 24-bit value.
As has been indicated previously, the truncation includes ignoring the least significant bits of the coding words for the red and blue components. In this case, the PSNR ratio for the red and blue components is 35.70 decibels and the PSNR ratio for the green component is 42.69 decibels. With regard to the calculation of the rounded value, this exhibits a PSNR ratio of 40.72 decibels with respect to the red and blue components and a PSNR ratio of 46.37 decibels with respect to the green component.